#include "UdpServer.hpp"
#include <memory>

void Usage(const std::string& str)
{
    std::cout<<str<<"port>1023"<<std::endl;
}

std::string Handler(const std::string& str)
{
    std::string info =str;
    return info;
}

int main(int argc, char* argv[])  //通过命令行参数获取
{
    if(2!=argc)
    {
        Usage(argv[0]);
        exit(0);
    }
    std::unique_ptr<UdpServer> sv(new UdpServer());
    sv->Init();
    sv->Run(Handler);
    return 0;
}